aux_source_directory(./ FRAMEWORK_SRCS)

SET(FORCE_PROJ_NAME hirop_force)

FIND_PACKAGE(HPlugin REQUIRED)

ADD_LIBRARY(${FORCE_PROJ_NAME} SHARED ${FRAMEWORK_SRCS})
TARGET_LINK_LIBRARIES(${FORCE_PROJ_NAME} ${HPlugin_LIBRARIES} ${YAML_CPP_LIBRARIES})

CONFIGURE_FILE(${FORCE_PROJ_NAME}.cmake.in ${PROJECT_BINARY_DIR}/${FORCE_PROJ_NAME}Config.cmake @ONLY)

SET(${PICKPLACE_PLUGIN_PATH} /usr/local/lib/)

## 安装目标文件
INSTALL(TARGETS ${FORCE_PROJ_NAME}
        EXPORT ${FORCE_PROJ_NAME}
        LIBRARY DESTINATION lib
        INCLUDES DESTINATION include)

## 安装头文件
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include/hirop)

## 安装cmake配置文件
INSTALL(FILES "${PROJECT_BINARY_DIR}/${FORCE_PROJ_NAME}Config.cmake" DESTINATION lib/cmake/${FORCE_PROJ_NAME}/)
